﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utility;
using Utility.Models;
namespace JYJJ.Web.Pages
{
    public partial class payOrder : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["out_trade_no"] != null)
            {
                model_Donate_Order order = JYJJ.BLL.ServceHelper.ServiceDonate().GetDonateOrderModelByOrderID(Request.Params["out_trade_no"].ToString());
                if (order != null)
                {
                    if (order.Status == 1)
                    {
                        //Response.Redirect("zhengshu.aspx?donateId=" + order.donateId.ToSafeInt().ToSafeString() + "&orderId=" + order.orderId + "");
                        Response.Redirect(Utility.Config.ConfigHelper.WebHomeAddress_CMS + "thanks.html?donateId=" + order.donateId.ToSafeInt().ToSafeString() + "&orderId=" + order.orderId + "");
                    }
                    else
                    {
                        Response.Write("<h1>订单支付失败，请核实</h1>");
                        Response.End();
                    }
                }
            }
            else
            {
                Response.Write("<h1>订单数据获取失败，请核实</h1>");
                Response.End();
            }
        }
    }
}